# Contributor: Saijin-Naib <Saijin-Naib_package-maintenance@outlook.com>
# Maintainer: Saijin-Naib <Saijin-Naib_package-maintenance@outlook.com>
pkgname=m2r2
pkgver=0_git20211210
_githash=b47d195275d39201c6bd0da4c26acbae28fcbcb9
pkgrel=2
pkgdesc="Markdown to reStructuredText converter"
url="https://crossnox.github.io/m2r2"
arch="all"
license="MIT"
depends="python3 py3-docutils py3-mistune1 py3-setuptools py3-setuptools_scm"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.zip::https://github.com/CrossNox/m2r2/archive/$_githash.zip
	no-circular-import.patch
	mistune1.patch
	"
builddir="$srcdir/$pkgname-$_githash"

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
136a9f60fef67e14dc4a64b159e85f500941eda82d7660ed1276d9c2a3e363bb7786936ed3c163756fc886707ccc1017d8ad1e4f7baa744503ba3455b9e9c242  m2r2-0_git20211210.zip
3f6c03ac0244b9514a830449a1ac57d2cecd30b5f5c84301eb68f304d3d8e6e6287770c9ea8144c6cee9d00c21b48e6d88ace0e92e80ee460c6c6d02cb29c34f  no-circular-import.patch
e9831e9b25f11e9e980937c45d83853aca6717539feb0a093147bf482a98a6e2987de85df1c54acdf8fb4f0e13f38afead302045aff0ce39742267fdf2966037  mistune1.patch
"
